﻿

if not Exists(select * from sysobjects where name = 'NewsLetterCampaignStat' and Xtype = 'U') 
Begin

	Create table dbo.NewsLetterCampaignStat (
		CampaignStatId int not null,
		EmailSentCount int null,
		OpenEmailCount int null,
		DistinctOpenEmailCount int null,
		ClickCount int null,
		DistinctClickCount int null,
		AddToCartCount int null,
		OrderCount int null,
		DistinctLinkCount int null,
		UnsubscribeCount int null,
		StartSendDate DateTime null,
		EndSendDate DateTime null,
		LastClickDate DateTime null,
		LastOpenDate DateTime null
	)

	create unique clustered Index IX_NewsLetterCampaignStat_CampaignStatId on NewsLetterCampaignStat(CampaignStatId)
End